package file;

import java.io.File;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Home-pc
 * Date: 2023-10-02
 * Time: 11:26
 */
//文件重命名
public class Demo4 {
    public static void main(String[] args) {
        File file1=new File("./123.txt");
        File file2=new File("./src/abc.txt");
        System.out.println(file1.renameTo(file2));

    }
}
